package com.java.base.exercise;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author RenPu
 * @Date 2021/12/27 19:39
 * @Version 1.0
 * @Description:
 **/
public class Test003 extends Thread {


   AtomicInteger atomicInteger=new AtomicInteger(0);

    @Override
    public void run() {
        for (int i = 0; i <10 ; i++) {
            int i1 = atomicInteger.incrementAndGet();
            System.out.println("當前值為................"+i1);
        }
    }

    public static void main(String[] args) {

        new Test003().start();

    }
}
